<template>
    <div>
        <eagle-popup title="选择巡检路线" round position="bottom"  :popStyle="{ height: '80%' }" v-bind="$attrs" v-on="$listeners" ref="eaglePopup">
            <div>
                <eagle-page-list ref="eaglePageList" @bindData="bindData" :queryParams="queryParams" :controller="controller" :conditions="conditions" :pageSize="20" :isSticky="false">
                    <template slot="list">
                        <van-cell v-for="(item, index) in this.list" :key="index" :title="item.PatrolRouteName" @click="submit(index)"/>
                    <!-- <div @click="submit(item, index)">
                        <div class="f12">{{ item.PatrolRouteName }}</div>
                    </div> -->
                    </template>
                </eagle-page-list>
            </div>
        </eagle-popup>
    </div>
</template>
<script>
export default {
    data(){
        return {
            controller: "DangerPatrolRoute",
            queryParams: {
                dataType: "List",
            },
            conditions: {},
            list:[],
        }
    },
    methods:{
        bindData(list) {
            this.list = list;
        },
        submit(index){
            this.$emit("inspectionWayCallback",this.list[index])
        },
    }
}
</script>